package by.pavlyukevich.paymentsystem.datamodel.payment;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.ManyToOne;

import by.pavlyukevich.paymentsystem.datamodel.AbstractEntity;

@Entity
public class Subsum extends AbstractEntity<Integer> {

	@ManyToOne(fetch = FetchType.LAZY, cascade = { CascadeType.REFRESH })
	private Payment payment;

	@Column
	private Double consumption;

	@Column
	private Double price;

	@Column
	private Double amount;

	public Payment getPayment() {
		return payment;
	}

	public void setPayment(Payment payment) {
		this.payment = payment;
	}

	public Double getConsumption() {
		return consumption;
	}

	public void setConsumption(Double consumption) {
		this.consumption = consumption;
	}

	public Double getPrice() {
		return price;
	}

	public void setPrice(Double price) {
		this.price = price;
	}

	public Double getAmount() {
		return amount;
	}

	public void setAmount(Double amount) {
		this.amount = amount;
	}

}
